.Dd March  3, 2024
.Dt libregf 3
.Os libregf
.Sh NAME
.Nm libregf.h
.Nd Library to access the Windows NT Registry File (REGF) format
.Sh SYNOPSIS
.In libregf.h
.Pp
Support functions
.Ft const char *
.Fn libregf_get_version "void"
.Ft int
.Fn libregf_get_access_flags_read "void"
.Ft int
.Fn libregf_get_codepage "int *codepage" "libregf_error_t **error"
.Ft int
.Fn libregf_set_codepage "int codepage" "libregf_error_t **error"
.Ft int
.Fn libregf_check_file_signature "const char *filename" "libregf_error_t **error"
.Pp
Available when compiled with wide character string support:
.Ft int
.Fn libregf_check_file_signature_wide "const wchar_t *filename" "libregf_error_t **error"
.Pp
Available when compiled with libbfio support:
.Ft int
.Fn libregf_check_file_signature_file_io_handle "libbfio_handle_t *bfio_handle" "libregf_error_t **error"
.Pp
Notify functions
.Ft void
.Fn libregf_notify_set_verbose "int verbose"
.Ft int
.Fn libregf_notify_set_stream "FILE *stream" "libregf_error_t **error"
.Ft int
.Fn libregf_notify_stream_open "const char *filename" "libregf_error_t **error"
.Ft int
.Fn libregf_notify_stream_close "libregf_error_t **error"
.Pp
Error functions
.Ft void
.Fn libregf_error_free "libregf_error_t **error"
.Ft int
.Fn libregf_error_fprint "libregf_error_t *error" "FILE *stream"
.Ft int
.Fn libregf_error_sprint "libregf_error_t *error" "char *string" "size_t size"
.Ft int
.Fn libregf_error_backtrace_fprint "libregf_error_t *error" "FILE *stream"
.Ft int
.Fn libregf_error_backtrace_sprint "libregf_error_t *error" "char *string" "size_t size"
.Pp
File functions
.Ft int
.Fn libregf_file_initialize "libregf_file_t **file" "libregf_error_t **error"
.Ft int
.Fn libregf_file_free "libregf_file_t **file" "libregf_error_t **error"
.Ft int
.Fn libregf_file_signal_abort "libregf_file_t *file" "libregf_error_t **error"
.Ft int
.Fn libregf_file_open "libregf_file_t *file" "const char *filename" "int access_flags" "libregf_error_t **error"
.Ft int
.Fn libregf_file_close "libregf_file_t *file" "libregf_error_t **error"
.Ft int
.Fn libregf_file_is_corrupted "libregf_file_t *file" "libregf_error_t **error"
.Ft int
.Fn libregf_file_get_ascii_codepage "libregf_file_t *file" "int *ascii_codepage" "libregf_error_t **error"
.Ft int
.Fn libregf_file_set_ascii_codepage "libregf_file_t *file" "int ascii_codepage" "libregf_error_t **error"
.Ft int
.Fn libregf_file_get_format_version "libregf_file_t *file" "uint32_t *major_version" "uint32_t *minor_version" "libregf_error_t **error"
.Ft int
.Fn libregf_file_get_type "libregf_file_t *file" "uint32_t *file_type" "libregf_error_t **error"
.Ft int
.Fn libregf_file_get_root_key "libregf_file_t *file" "libregf_key_t **key" "libregf_error_t **error"
.Ft int
.Fn libregf_file_get_key_by_utf8_path "libregf_file_t *file" "const uint8_t *utf8_string" "size_t utf8_string_length" "libregf_key_t **key" "libregf_error_t **error"
.Ft int
.Fn libregf_file_get_key_by_utf16_path "libregf_file_t *file" "const uint16_t *utf16_string" "size_t utf16_string_length" "libregf_key_t **key" "libregf_error_t **error"
.Pp
Available when compiled with wide character string support:
.Ft int
.Fn libregf_file_open_wide "libregf_file_t *file" "const wchar_t *filename" "int access_flags" "libregf_error_t **error"
.Pp
Available when compiled with libbfio support:
.Ft int
.Fn libregf_file_open_file_io_handle "libregf_file_t *file" "libbfio_handle_t *file_io_handle" "int access_flags" "libregf_error_t **error"
.Pp
Key functions
.Ft int
.Fn libregf_key_free "libregf_key_t **key" "libregf_error_t **error"
.Ft int
.Fn libregf_key_is_corrupted "libregf_key_t *key" "libregf_error_t **error"
.Ft int
.Fn libregf_key_get_offset "libregf_key_t *key" "off64_t *offset" "libregf_error_t **error"
.Ft int
.Fn libregf_key_get_name_size "libregf_key_t *key" "size_t *name_size" "libregf_error_t **error"
.Ft int
.Fn libregf_key_get_name "libregf_key_t *key" "uint8_t *name" "size_t name_size" "libregf_error_t **error"
.Ft int
.Fn libregf_key_get_utf8_name_size "libregf_key_t *key" "size_t *utf8_string_size" "libregf_error_t **error"
.Ft int
.Fn libregf_key_get_utf8_name "libregf_key_t *key" "uint8_t *utf8_string" "size_t utf8_string_size" "libregf_error_t **error"
.Ft int
.Fn libregf_key_get_utf16_name_size "libregf_key_t *key" "size_t *utf16_string_size" "libregf_error_t **error"
.Ft int
.Fn libregf_key_get_utf16_name "libregf_key_t *key" "uint16_t *utf16_string" "size_t utf16_string_size" "libregf_error_t **error"
.Ft int
.Fn libregf_key_get_class_name_size "libregf_key_t *key" "size_t *class_name_size" "libregf_error_t **error"
.Ft int
.Fn libregf_key_get_class_name "libregf_key_t *key" "uint8_t *class_name" "size_t class_name_size" "libregf_error_t **error"
.Ft int
.Fn libregf_key_get_utf8_class_name_size "libregf_key_t *key" "size_t *utf8_string_size" "libregf_error_t **error"
.Ft int
.Fn libregf_key_get_utf8_class_name "libregf_key_t *key" "uint8_t *utf8_string" "size_t utf8_string_size" "libregf_error_t **error"
.Ft int
.Fn libregf_key_get_utf16_class_name_size "libregf_key_t *key" "size_t *utf16_string_size" "libregf_error_t **error"
.Ft int
.Fn libregf_key_get_utf16_class_name "libregf_key_t *key" "uint16_t *utf16_string" "size_t utf16_string_size" "libregf_error_t **error"
.Ft int
.Fn libregf_key_get_last_written_time "libregf_key_t *key" "uint64_t *filetime" "libregf_error_t **error"
.Ft int
.Fn libregf_key_get_security_descriptor_size "libregf_key_t *key" "size_t *security_descriptor_size" "libregf_error_t **error"
.Ft int
.Fn libregf_key_get_security_descriptor "libregf_key_t *key" "uint8_t *security_descriptor" "size_t security_descriptor_size" "libregf_error_t **error"
.Ft int
.Fn libregf_key_get_number_of_values "libregf_key_t *key" "int *number_of_values" "libregf_error_t **error"
.Ft int
.Fn libregf_key_get_value_by_index "libregf_key_t *key" "int value_index" "libregf_value_t **value" "libregf_error_t **error"
.Ft int
.Fn libregf_key_get_value_by_utf8_name "libregf_key_t *key" "const uint8_t *utf8_string" "size_t utf8_string_length" "libregf_value_t **value" "libregf_error_t **error"
.Ft int
.Fn libregf_key_get_value_by_utf16_name "libregf_key_t *key" "const uint16_t *utf16_string" "size_t utf16_string_length" "libregf_value_t **value" "libregf_error_t **error"
.Ft int
.Fn libregf_key_get_number_of_sub_keys "libregf_key_t *key" "int *number_of_sub_keys" "libregf_error_t **error"
.Ft int
.Fn libregf_key_get_sub_key_by_index "libregf_key_t *key" "int sub_key_index" "libregf_key_t **sub_key" "libregf_error_t **error"
.Ft int
.Fn libregf_key_get_sub_key_by_utf8_name "libregf_key_t *key" "const uint8_t *utf8_string" "size_t utf8_string_length" "libregf_key_t **sub_key" "libregf_error_t **error"
.Ft int
.Fn libregf_key_get_sub_key_by_utf8_path "libregf_key_t *key" "const uint8_t *utf8_string" "size_t utf8_string_length" "libregf_key_t **sub_key" "libregf_error_t **error"
.Ft int
.Fn libregf_key_get_sub_key_by_utf16_name "libregf_key_t *key" "const uint16_t *utf16_string" "size_t utf16_string_length" "libregf_key_t **sub_key" "libregf_error_t **error"
.Ft int
.Fn libregf_key_get_sub_key_by_utf16_path "libregf_key_t *key" "const uint16_t *utf16_string" "size_t utf16_string_length" "libregf_key_t **sub_key" "libregf_error_t **error"
.Pp
Value functions
.Ft int
.Fn libregf_value_free "libregf_value_t **value" "libregf_error_t **error"
.Ft int
.Fn libregf_value_is_corrupted "libregf_value_t *value" "libregf_error_t **error"
.Ft int
.Fn libregf_value_get_offset "libregf_value_t *value" "off64_t *offset" "libregf_error_t **error"
.Ft int
.Fn libregf_value_get_name_size "libregf_value_t *value" "size_t *name_size" "libregf_error_t **error"
.Ft int
.Fn libregf_value_get_name "libregf_value_t *value" "uint8_t *name" "size_t name_size" "libregf_error_t **error"
.Ft int
.Fn libregf_value_get_utf8_name_size "libregf_value_t *value" "size_t *utf8_string_size" "libregf_error_t **error"
.Ft int
.Fn libregf_value_get_utf8_name "libregf_value_t *value" "uint8_t *utf8_string" "size_t utf8_string_size" "libregf_error_t **error"
.Ft int
.Fn libregf_value_get_utf16_name_size "libregf_value_t *value" "size_t *utf16_string_size" "libregf_error_t **error"
.Ft int
.Fn libregf_value_get_utf16_name "libregf_value_t *value" "uint16_t *utf16_string" "size_t utf16_string_size" "libregf_error_t **error"
.Ft int
.Fn libregf_value_get_value_type "libregf_value_t *value" "uint32_t *value_type" "libregf_error_t **error"
.Ft int
.Fn libregf_value_get_value_data_size "libregf_value_t *value" "size_t *value_data_size" "libregf_error_t **error"
.Ft int
.Fn libregf_value_get_value_data "libregf_value_t *value" "uint8_t *value_data" "size_t value_data_size" "libregf_error_t **error"
.Ft int
.Fn libregf_value_get_value_32bit "libregf_value_t *value" "uint32_t *value_32bit" "libregf_error_t **error"
.Ft int
.Fn libregf_value_get_value_64bit "libregf_value_t *value" "uint64_t *value_64bit" "libregf_error_t **error"
.Ft int
.Fn libregf_value_get_value_utf8_string_size "libregf_value_t *value" "size_t *utf8_string_size" "libregf_error_t **error"
.Ft int
.Fn libregf_value_get_value_utf8_string "libregf_value_t *value" "uint8_t *utf8_string" "size_t utf8_string_size" "libregf_error_t **error"
.Ft int
.Fn libregf_value_get_value_utf16_string_size "libregf_value_t *value" "size_t *utf16_string_size" "libregf_error_t **error"
.Ft int
.Fn libregf_value_get_value_utf16_string "libregf_value_t *value" "uint16_t *utf16_string" "size_t utf16_string_size" "libregf_error_t **error"
.Ft int
.Fn libregf_value_get_value_binary_data_size "libregf_value_t *value" "size_t *size" "libregf_error_t **error"
.Ft int
.Fn libregf_value_get_value_binary_data "libregf_value_t *value" "uint8_t *binary_data" "size_t size" "libregf_error_t **error"
.Ft int
.Fn libregf_value_get_value_multi_string "libregf_value_t *value" "libregf_multi_string_t **multi_string" "libregf_error_t **error"
.Pp
Multi string functions
.Ft int
.Fn libregf_multi_string_free "libregf_multi_string_t **multi_string" "libregf_error_t **error"
.Ft int
.Fn libregf_multi_string_get_number_of_strings "libregf_multi_string_t *multi_string" "int *number_of_strings" "libregf_error_t **error"
.Ft int
.Fn libregf_multi_string_get_utf8_string_size "libregf_multi_string_t *multi_string" "int string_index" "size_t *utf8_string_size" "libregf_error_t **error"
.Ft int
.Fn libregf_multi_string_get_utf8_string "libregf_multi_string_t *multi_string" "int string_index" "uint8_t *utf8_string" "size_t utf8_string_size" "libregf_error_t **error"
.Ft int
.Fn libregf_multi_string_get_utf16_string_size "libregf_multi_string_t *multi_string" "int string_index" "size_t *utf16_string_size" "libregf_error_t **error"
.Ft int
.Fn libregf_multi_string_get_utf16_string "libregf_multi_string_t *multi_string" "int string_index" "uint16_t *utf16_string" "size_t utf16_string_size" "libregf_error_t **error"
.Sh DESCRIPTION
The
.Fn libregf_get_version
function is used to retrieve the library version.
.Sh RETURN VALUES
Most of the functions return NULL or \-1 on error, dependent on the return type.
For the actual return values see "libregf.h".
.Sh ENVIRONMENT
None
.Sh FILES
None
.Sh NOTES
libregf can be compiled with wide character support (wchar_t).
.sp
To compile libregf with wide character support use:
.Ar ./configure --enable-wide-character-type=yes
 or define:
.Ar _UNICODE
 or
.Ar UNICODE
 during compilation.
.sp
.Ar LIBREGF_WIDE_CHARACTER_TYPE
 in libregf/features.h can be used to determine if libregf was compiled with wide character support.
.Sh BUGS
Please report bugs of any kind on the project issue tracker: https://github.com/libyal/libregf/issues
.Sh AUTHOR
These man pages are generated from "libregf.h".
.Sh COPYRIGHT
Copyright (C) 2009-2024, Joachim Metz <joachim.metz@gmail.com>.
.sp
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
.Sh SEE ALSO
the libregf.h include file
